import { Injectable } from '@nestjs/common';
import { RmqService } from '@app/rmq';

@Injectable()
export class AppService {
  constructor(private readonly mqService: RmqService) {
    this.mqService.client.connect();
  }

  public sendMessage(value: string) {
    const pattern = { cmd: 'length' };
    return this.mqService.client.send<string>(pattern, value);
  }
}
